package org.example.work2.tcc.business.controller;

import org.example.work2.tcc.business.dto.Business;
import org.example.work2.tcc.business.serivce.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 业务主任
 *
 * @author xh
 * @date 2023/04/03
 */
@RestController
@RequestMapping("/at")
public class BusinessController {
    
    @Autowired
    BusinessService businessService;

    @PostMapping ("/order-place")
    public String placeOrder(@RequestBody Business business){

        return businessService.placeOrder(business);
    }
}
